package com.dragon.smtp.dao;

import com.dragon.smtp.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 小龙
 * @since 2022-11-08
 */
@Mapper
public interface UserDao extends BaseMapper<User> {

    @Select("SELECT * from user where username = #{fromName} ")
    User selectByName(String fromName);
    @Select("SELECT nick_name from user where username = #{username} ")
    String getNickNameByName(String username);
}
